// Learn TypeScript:
//  - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
// Learn Attribute:
//  - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html

import { game } from "../../../../script/game/control/game";
import { ccs } from "../../../../script/util/services";
import { WinBase } from "../../../../script/wins/WinBase";

const {ccclass, property} = cc._decorator;

@ccclass
export default class NewClass extends WinBase {

    @property(cc.Node)
    rotateTable: cc.Node = null;

    
    start () {
        this.getData();
        this.touchEndEventScale(this.rotateTable, () => {
            if(game.playerMgr.reducePower(10) && game.playerMgr.calMoney(-100)) {
                ccs.winMgr.showWin("gambleRotateWin");
                game.recordMgr.addList({name: "你", action: "进入了幸运大转盘，大展身手", location: "东华娱乐城"});
                game.playerMgr.achieveFinish('gamble', 1);
            }
        })
    }
    getData() {
        // let list = ccs.dataMgr.getGambleList();
        // this.list.updateItems(list);
    }
}
